-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: auxdisplay: Add TM1637 7-segment display driver #96510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a67e10d
to
8702ccd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you shouldn't be requiring a custom, device-specific, API for this - please implement this as an auxdisplay driver. Custom sample will likely also go away in the process
Thanks!
8702ccd
to
7736d71
Compare
7736d71
to
475d8e2
Compare
Got it. I reimplemented it for the auxdisplay subsystem. Thanks |
Also there is a lot of changing of GPIO mode from input to output, would it be better to just configure it at start-up as output then to input and output again in that function, and optionally in on/off functions? |
Yes. That is what I should have done in the first place Edit: Well the CLK can be removed but the DIO pin does need to be reconfigured to OUTPUT before start/stop conditions because it's left in INPUT mode after reading the ACK signal in tm1637_send_byte() |
49140de
to
8bb9dc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8bb9dc4
to
3ef56cb
Compare
Hi @simonguinot, |
Hi @thedjnK, @mbolivar, @kartben, @nashif, @xingrz, and other reviewers, I wanted to check in on this PR for the TM1637 7-segment display driver. Please let me know if there are any remaining changes or feedback required to help move it forward. This is my first time sumbitting a driver so that would make sense. |
Add device tree binding for TitanMicro TM1637 7-segment LED display controller. The TM1637 uses a GPIO bit-banging protocol with clock and data pins. Properties: - clk-gpios: Clock GPIO pin - dio-gpios: Data I/O GPIO pin - bit-delay-us: Bit delay for GPIO protocol timing Signed-off-by: Siratul Islam <[email protected]>
3ef56cb
to
b74ba5e
Compare
Hi @xingrz, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! Just a minor thought - it might be a bit clearer to define the segment codes using BIT(x)
combinations instead of magic numbers. But it’s totally fine to keep it as is if you prefer.
Hi @xingrz, Thanks for taking a look again! I kept them in hex since it follows the standard convention for 7-segment lookup tables (e.g., https://en.wikichip.org/wiki/seven-segment_display/representing_letters). The hex format is more compact and matches how most 7-segment drivers represent these patterns. Happy to change to BIT() macros if you prefer though. Thanks |
Add a new auxdisplay driver for TM1637 7-segment LED displays. The driver supports: - 4-digit 7-segment display output - Decimal point positioning - Brightness control (0-7 levels) - Display on/off control - Alphabet character support (A-Z, a-z) and digits (0-9) - Basic cursor positioning The driver implements the standard AUXDISPLAY API Signed-off-by: Siratul Islam <[email protected]>
Add build test coverage for the TM1637 auxdisplay driver. Creates gpio_devices.overlay for GPIO-based auxdisplay devices and adds corresponding test case to verify the driver builds correctly on native_sim platforms. Signed-off-by: Siratul Islam <[email protected]>
b74ba5e
to
a877018
Compare
|
Add a new auxdisplay driver for TM1637 7-segment LED displays. The driver supports:
The driver implements the standard AUXDISPLAY API